﻿namespace Cos.Module.Configuration
{
    using System.Collections.Generic;

    using Cos.Core.Model.Common;

    //@Transactional(propagation = Propagation.REQUIRED, readOnly = true)
    public interface ICultureService
    {
        /// <summary>
        /// Get the default culture
        /// </summary>
        //@Secured({ AuthenticatedVoter.IS_AUTHENTICATED_ANONYMOUSLY })
        Culture DefaultCulture { get; }

        /// <summary>
        /// Get the list of all cultures.
        /// </summary>
        /// <returns>The list of allowed cultures</returns>
        //@Secured({ AuthenticatedVoter.IS_AUTHENTICATED_ANONYMOUSLY })
        IEnumerable<Culture> GetCultures();
        
        Culture GetCulture(string cultureCode);

        /// <summary>
        /// Save a culture to the cms.
        /// </summary>
        /// <param name="culture">The culture to save</param>
        /// <returns>The saved culture (fully populated)</returns>
        //@Secured({ AuthenticatedVoter.IS_AUTHENTICATED_FULLY, "ROLE_" + User.Role.ADMIN })
        Culture SaveCulture(Culture culture);
    }
}